namespace Baula.TextGen.ActiveTemplating
{
    public static class StringExtensions
    {
        public static string CutFromStart(this string text, int characterCount)
        {
            if (text == null)
                return string.Empty;
            if (text.Length <= characterCount)
                return string.Empty;
            return text.Substring(characterCount, text.Length - characterCount);
        }

        public static string CutFromEnd(this string text, int characterCount)
        {
            if (text == null)
                return string.Empty;
            if (text.Length <= characterCount)
                return string.Empty;
            return text.Substring(0, text.Length - characterCount);
        }
    }
}